﻿<?php
    require_once("mysqli_con.php");

    $name = $_POST['name'];   //姓名
    $grade = $_POST['grade']; //学院年级专业
    $job = $_POST['job'];     //应聘职位
    $phone = $_POST['phone']; //电话号码
    $email = $_POST['email']; //邮箱
    $content = $_POST['content']; //自我简介
    $dateline = date('y-m-d H:i:sa');

    //判断数据是否为空
    if(empty($name) || empty($grade) || empty($job) || empty($phone) || empty($email) || empty($content)){
    	echo "<script> alert('你的信息还没有填写完整，请认真填写');window.location.href='massage.php'</script>";
        exit();
    }

    //写入数据库
    $insert = "insert into develop(name,grade,job,phone,email,content,dateline) values('$name','$grade','$job','$phone','$email','$content','$dateline')";
    $query = mysqli_query($con, $insert);
    if($query){
    	echo "<script> alert('恭喜你报名成功，请耐心等候我们的通知');window.location.href='massage.php'</script>";
    }
?>